package com.heima.media.listener;

import com.heima.media.task.MediaTasks;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@Service
public class AuditListener {

    @Autowired
    private MediaTasks mediaTasks;

    @PostConstruct
    public void startTask() throws InterruptedException {
        mediaTasks.handleMessage();
    }
}
